﻿-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters 
-- command (Ctrl-Shift-M) to fill in the parameter 
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Mrinmoy Das>
-- Create date: <01/03/2011>
-- Description:	<sp_Sys_ModuleMaster_Insert>
-- =============================================
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'sp_Sys_ModuleMaster_Insert')
	BEGIN
		DROP  Procedure  sp_Sys_ModuleMaster_Insert
	END

GO

CREATE PROCEDURE sp_Sys_ModuleMaster_Insert 
	-- Add the parameters for the stored procedure here
	(
				@ModuleID int, 
				@ModuleName varchar(50),
				@ModuleDescription nvarchar(max)
	)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    INSERT INTO [Sys_ModuleMaster]
           (	
				[ModuleID],
				[ModuleName],
				[ModuleDescription],
				[Sys_DateOfCreation],
				[Sys_DateOfModification],
				[Sys_CreatedByID],
				[Sys_ModifiedByID],
				[Sys_DeleteType],
				[Sys_IsDeleted],
				[Sys_OrganizationID],
				[Sys_InitialPrimaryKeys],
				[Sys_WorkstationName]
			)
     VALUES
           (
				@ModuleID,
				@ModuleName,
				@ModuleDescription,
				GETDATE(),
				GETDATE(),
				'SysAdmin',
				'SysAdmin',
				1,
				0,
				-1,
				NULL,
				NULL
			)
END
GO
